package com.cskaoyan.catmall.model.vo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 创建日期: 2022-01-10-14-15
 * author : LL
 * description:
 */
@NoArgsConstructor
@Data
public class WxHomeIndexVo {

    // 数据库中的market_goods的is_new字段
    private List<NewGoodsListDTO> newGoodsList;
    //market_coupon
    private List<CouponListDTO> couponList;
    //market_category部分字段
    private List<ChannelDTO> channel;
    //market_groupon
    private List<GrouponListDTO> grouponList;
    // market_ad
    private List<BannerDTO> banner;
    // market_brand
    private List<BrandListDTO> brandList;
    // 数据库中的market_goods的is_hot字段
    private List<HotGoodsListDTO> hotGoodsList;
    //market_topic
    private List<TopicListDTO> topicList;
    //market_goods 部分字段
    private List<FloorGoodsListDTO> floorGoodsList;

    @NoArgsConstructor
    @Data
    public static class NewGoodsListDTO {
        private Integer id;
        private String name;
        private String brief;
        private String picUrl;
        private Boolean isNew;
        private Boolean isHot;
        private Double counterPrice;
        private Integer retailPrice;
    }

    @NoArgsConstructor
    @Data
    public static class CouponListDTO {
        private Integer id;
        private String name;
        private String desc;
        private String tag;
        private Integer discount;
        private Integer min;
        private Integer days;
        private String startTime;
        private String endTime;
    }

    @NoArgsConstructor
    @Data
    public static class ChannelDTO {
        private Integer id;
        private String name;
        private String iconUrl;
    }

    @NoArgsConstructor
    @Data
    public static class GrouponListDTO {
        private Integer id;
        private String name;
        private String brief;
        private String picUrl;
        private Integer counterPrice;
        private Integer retailPrice;
        private Integer grouponPrice;
        private Integer grouponDiscount;
        private Integer grouponMember;
        private String expireTime;
    }

    @NoArgsConstructor
    @Data
    public static class BannerDTO {
        private Integer id;
        private String name;
        private String link;
        private String url;
        private Integer position;
        private String content;
        private Boolean enabled;
        private String addTime;
        private String updateTime;
        private Boolean deleted;
    }

    @NoArgsConstructor
    @Data
    public static class BrandListDTO {
        private Integer id;
        private String name;
        private String desc;
        private String picUrl;
        private Double floorPrice;
    }

    @NoArgsConstructor
    @Data
    public static class HotGoodsListDTO {
        private Integer id;
        private String name;
        private String brief;
        private String picUrl;
        private Boolean isNew;
        private Boolean isHot;
        private Integer counterPrice;
        private Integer retailPrice;
    }

    @NoArgsConstructor
    @Data
    public static class TopicListDTO {
        private Integer id;
        private String title;
        private String subtitle;
        private Integer price;
        private String readCount;
        private String picUrl;
    }

    @NoArgsConstructor
    @Data
    public static class FloorGoodsListDTO {
        private String name;
        private List<GoodsListDTO> goodsList;
        private Integer id;

        @NoArgsConstructor
        @Data
        public static class GoodsListDTO{
            private Integer id;
            private String name;
            private String brief;
            private String picUrl;
            private Boolean isNew;
            private Boolean isHot;
            private Double counterPrice;
            private Double retailPrice;
        }
    }
}